home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / qlib54.zip / VIDEO.DOC < prev   
Text File  |  1992-03-21  |  44KB  |  1,106 lines

  1.     QLIB VIDEO routines give your programs more control over the
  2.     screen than BASIC allows.  You can save and restore screens,
  3.     print on the screen or read from the screen at blinding speed, use
  4.     dual-monitor systems, use "virtual screens", and use screen color
  5.     attributes not availiable with BASIC alone.
  6.  
  7.     Two kinds of QLIB video routines are available: Direct Video Memory
  8.     (DVM), the fastest available, and BIOS, compatible with a wider range of
  9.     hardware and software.
  10.  
  11.     BIOS video routines use the PC's BIOS and are slower than DVM routines,
  12.     but are more compatible with oddball hardware than comparable QLIB DVM
  13.     subroutines.  NOTE: "oddball hardware" does not mean the average $1.98
  14.     PC clone.  QLIB's DVM subroutines were developed using a cheap XT clone
  15.     with a Hercules-clone graphics card, and work equally well with higher-
  16.     priced equipment.  BIOS video subroutines also work in most graphics
  17.     modes, but background colors may not work as expected.  To use BIOS
  18.     subroutines in Hercules graphics mode, QBHERC or MSHERC must be loaded.
  19.     On computers which have multiple screen pages (except Hercules), BIOS
  20.     subroutines work with the page set by QLIB's TPage subroutine or
  21.     BASIC's SCREEN command.
  22.  
  23.     Some multi-task software, as well as weird hardware, has problems with
  24.     DVM.  With this in mind, several BIOS video subroutines were designed to
  25.     share common calling syntax and function with DVM subroutines, so that
  26.     you may quickly adapt your programs to a variety of situations.
  27.  
  28.     Many of QLIB's video routines support a wide variety of screen
  29.     dimensions.  In addition to the standard 40- and 80-column modes,
  30.     EGA 43-row and VGA 50-row text modes are also supported, and users of
  31.     several EGA and VGA systems may also use 132-column text modes at
  32.     QLIB speed.  With the Hercules Graphics Card Plus and InColor card,
  33.     90-column and 43-row modes are available, which work with QLIB's
  34.     video subroutines.  If you are using other equipment which allows non-
  35.     standard text modes, call me and I may be able to help you.
  36.  
  37.     DVM video subroutines take advantage of PC video systems' known video
  38.     memory addresses and transfer data directly to video memory instead of
  39.     working through DOS or the PC BIOS.  This results in nearly instant
  40.     displays.  DVM also provides additional support for the Hercules Graphics
  41.     Card not available otherwise.
  42.  
  43.     Video hardware configurations supported include Monochrome Display Adapter
  44.     (MDA), Color Graphics Adapter (CGA), Hercules Graphics Card, (HGC),
  45.     Hercules Graphics Card Plus (HGC+), Enhanced Graphics Adapter (EGA),
  46.     Everex Micro Enhancer Deluxe EGA (EEGA), Paradise EGA 480 (PEGA),
  47.     MCGA and VGA.  I have used QLIB with MDA, MCGA, HGC, HGC+, EGA, EEGA,
  48.     PEGA, and several VGA systems.
  49.  
  50.  
  51.     Most video display systems have much more memory than required to display
  52.     a full screen of text.  This additional memory is required when the
  53.     system is used in graphics mode, but it may also be used to advantage in
  54.     text mode.  Screen pages may be used to store help screens, to save one
  55.     screen while another is displayed, or to build one screen while another
  56.     is displayed.  The table below summarizes QLIB's screen page support
  57.     for various video systems.  This should not be considered a complete
  58.     table of information.
  59.  
  60.     system         screen size    page numbers   QuickBASIC/BIOS support
  61.     -------------  -----------    ------------   -----------------------
  62.     MDA            80 x 25        0                    yes    (1)
  63.     CGA            80 x 25        0 - 3                yes
  64.     CGA, EGA, VGA  40 x 25        0 - 7                yes
  65.     EGA, VGA       80 x 25        0 - 7                yes
  66.     EGA            80 x 43        0 - 3                yes
  67.     VGA            80 x 50        0 - 3                yes
  68.     Super EGA/VGA 132 x 25        0 - 3              limited
  69.     Super EGA/VGA 132 x 43        0 & 1              limited
  70.     HGC            80 x 25        0 - 15             limited  (2,3)
  71.     HGC+, InColor  90 x 25        0 - 13             limited  (3)
  72.    
  73.     (1)  MDA systems have enough memory for only one complete screen, but
  74.          virtual screens (see MakeVScreen) and ScreenSave may be used to
  75.          duplicate the effect of multiple screen pages.
  76.  
  77.     (2)  Hercules Graphics Cards and clones have sufficient memory for up
  78.          to 16 screen pages.  These are all available if there is no other
  79.          monitor connected to the computer, no RAMFont characters are used
  80.          and the second 32k of Hercules memory is included in the memory map.
  81.          See Use64k.
  82.  
  83.     (3)  BIOS subroutines work on page 0 only.  BASIC gets confused.
  84.  
  85.     Virtual screens may be used with all video systems.  See MakeVScreen.
  86.  
  87.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  88.  
  89.      Function: ANSIColor
  90.      object file: anscolor.obj
  91.  
  92.          ANSIColor returns the color attribute used by the ANSI.SYS
  93.      console driver.
  94.  
  95.      Example:
  96.  
  97.      REM $INCLUDE: 'qlib.bi'
  98.            attr% = ANSIColor
  99.  
  100.  
  101.  
  102.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  103.  
  104.      Subroutine: APrint(st$)
  105.      object file: aprint.obj
  106.  
  107.      Subroutine: APrintN(st$)
  108.      Subroutine: APrintT(st$)
  109.      object file: aprintn.obj
  110.  
  111.          APrint subroutines display the string st$ on the screen using
  112.      ANSI screen colors, begining at the current cursor location.  With
  113.      APrint, the cursor is moved to the end of the string.  APrintN moves
  114.      the cursor to the beginning of the next line, and APrintT adds a TAB,
  115.      moving the cursor past the end of the string.
  116.  
  117.      Example:
  118.  
  119.      CALL APrint(st$)
  120.  
  121.  
  122.  
  123.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  124.  
  125.      Subroutine: BigPrint(st$, row%, col%, attr%)
  126.      object files: bigprint.obj (q$crt.obj)
  127.  
  128.          BigPrint prints st$ on the screen using characters that are
  129.      eight times larger than normal text.  This is handy for attacting
  130.      attention to a display from a distance.  Only characters from
  131.      CHR$(0) through CHR$(127) can be used (but I can add CHR$(128) through
  132.      CHR$(255) if you want).  Only 10 characters will fit across a standard
  133.      80-column screen.
  134.  
  135.      Example:
  136.  
  137.      CALL BigPrint(st$, row%, col%, attr%)
  138.  
  139.  
  140.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  141.  
  142.      Subroutine: BlockFrame(style%, row0%, col0%, row1%, col1%, attr%)
  143.      object file: bframe.obj
  144.  
  145.          BlockFrame is a BIOS version of WindowFrame.  See WindowFrame for
  146.      more documentation.
  147.  
  148.  
  149.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  150.  
  151.      Subroutine: Bprint(st$, row%, col%, attr%)
  152.      object file: bprint.obj
  153.  
  154.      Subroutine: BprintL(st$, row%, col%, attr%)
  155.      Subroutine: BprintU(st$, row%, col%, attr%)
  156.      object file: bprintul.obj
  157.  
  158.          These subroutines use BIOS calls to duplicate the functions of
  159.      the Qprint series.  See Qprint for more documentation.
  160.  
  161.  
  162.  
  163.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  164.  
  165.     Subroutine: ClearBlock(row0%, col0%, row1%, col1%, attr%)
  166.     object file: scroll.obj
  167.  
  168.          Uses BIOS calls to duplicate the function of WindowClear,
  169.     below.  See WindowClear for additional information.
  170.  
  171.  
  172.  
  173.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  174.  
  175.     Subroutine: ClearEOL(attr%)
  176.     object file: cleareol.obj
  177.  
  178.          Uses BIOS calls to clear a row from the current cursor position
  179.     to then edge of the screen using color attr%.
  180.  
  181.     Example:
  182.          CALL ClearEOL(attr%)
  183.  
  184.  
  185.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  186.  
  187.     Subroutine: ClrScreen(attr%)
  188.     object files: clrscrn.obj (q$crt.obj, q$clrw.obj)
  189.  
  190.          ClrScreen uses DVM to clear the video page set by UseTPage to a
  191.     specified color attribute.  Color attributes may be calculated using
  192.     ColorATTR.
  193.  
  194.     Example:
  195.          CALL ClrScreen(attr%)
  196.  
  197.  
  198.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  199.  
  200.      Subroutine: Clock(row%, col%, attr%)              (QuickBASIC 4.x only)
  201.      Subroutine: NoClock
  202.      object file: qbclock.obj
  203.  
  204.          Clock prints and maintains a clock display on text-mode
  205.      screens at row row% and column col%, printed with color attribute
  206.      attr%.  The clock may be de-activated with NoClock, or may be moved
  207.      by calling clock again.  Clock should be de-activated when using
  208.      graphics modes.
  209.  
  210.      Example:
  211.           CALL Clock(1, 1, 14)     ' activate clock in upper left corner
  212.  
  213.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  214.  
  215.      Function: attr% = ColorAttr(fore%, back%)
  216.      object file: coloratt.obj
  217.  
  218.           Calculates the color attribute (attr%) for many QLIB video
  219.      subroutines.  ColorAttr allows use of the "blink" attribute, which may
  220.      also be used for high-intensity backgrounds (See SetBLINK).
  221.  
  222.  
  223.      Default color values for IBM (and compatible) color displays are:
  224.  
  225.      foreground color   Value
  226.  
  227.          black            0         Note: Background colors 0-7 are
  228.          blue             1         identical to foreground colors 0-7.
  229.          green            2         Background colors 8-15 are identical
  230.          cyan             3         foreground color 8-15 if Blink has
  231.          red              4         been turned off.  If blink is on,
  232.          magenta          5         background colors 8-15 will look like
  233.          brown            6         colors 0-7, and will make the foreground
  234.          "white"          7         blink.
  235.          gray             8
  236.          bright blue      9
  237.          bright green    10
  238.          bright cyan     11
  239.          bright red      12
  240.          bright magenta  13
  241.          yellow          14
  242.          bright white    15
  243.  
  244.     Example:
  245.          REM $INCLUDE: 'qlib.bi'
  246.          REM  I want bright red blinking characters on a green background
  247.          fore% = 12: back% = 10
  248.          attr% = ColorAttr(fore%, back%)
  249.  
  250.  
  251.     (continued on next page)
  252.  
  253.     For IBM Monochrome, Hercules and compatible displays:
  254.  
  255.          foreground value     appearance
  256.  
  257.                 0             black if background% = 0 or 7
  258.                               if background% between 1 and 6,
  259.                               normal if bright% = 0
  260.                               bright if bright% = 1
  261.  
  262.                 1             underlined, or bright + underline if bright% = 1
  263.  
  264.               2 - 7           normal, or bright if bright% = 1
  265.  
  266.          background value     appearance
  267.  
  268.               0 - 6           black
  269.                 7             normal color if foreground% = 0
  270.  
  271.                               bright if blink% = 1, SetBLINK(0)
  272.                                called, and foreground% = 0
  273.  
  274.                               black if foreground% <> 0
  275.  
  276.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  277.  
  278.      Subroutine: CursorColor(attr%)
  279.      object files: curscolr.obj (q$herc.obj)
  280.  
  281.      CursorColor enables the InColor card's color palette and sets the
  282.      cursor color.  If the InColor card in not installed, CursorColor
  283.      does nothing.
  284.  
  285.      Example:
  286.         attr% = 12        ' bright red
  287.                           ' legal color attributes are 1-15
  288.         CALL CursorColor(attr%)
  289.  
  290.  
  291.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  292.  
  293.      Subroutine: CursorON(row%, col%)
  294.      Subroutine: UCursorON(row%, col%)
  295.      Subroutine: CursorOFF
  296.      object file: cursor.obj (q$crt.obj)
  297.  
  298.           CursorON moves the cursor to row%, col%, and makes the cursor
  299.      visible.  An underscore cursor is used if the system is in OVERTYPE
  300.      mode, and the cursor is a larger block if the system is in INSERT mode.
  301.      InsertON and InsertOFF (see EQUIP.DOC) will turn the INSERT mode on
  302.      or off.  UCursorON makes the cursor visible as an underscore regardless
  303.      of the INSERT toggle.  CursorOFF makes the cursor invisible at its current
  304.      location.  Unlike BASIC's LOCATE command, CursorON works with PEGA, EEGA
  305.      and HGC+ extended text modes.  CursorON should not be used to position
  306.      the cursor for a BASIC PRINT command.  To use a text cursor in graphics
  307.      modes, see GCursor in GRAPHICS.DOC.
  308.  
  309.      Example:
  310.        row% = 25: col% = 1
  311.        CALL CursorON(row%, col%)
  312.        REM  this put the cursor in the lower left corner of a standard
  313.        REM  text screen and turned it on.
  314.             .
  315.        CALL CursorOFF
  316.        REM  the cursor is now invisible
  317.  
  318.  
  319.  
  320.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  321.  
  322.     Subroutine: FillEOL(char%, attr%)
  323.     object file: cleareol.obj
  324.  
  325.          Uses BIOS calls to fill a row from the current cursor position
  326.     to then edge of the screen using character char%, and color attr%.
  327.     Note that char% is the ASCII character code of the character used.
  328.  
  329.     Example:
  330.          CALL FillEOL(ASCII("w"), attr%)
  331.  
  332.  
  333.  
  334.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  335.  
  336.     Subroutine: GetANSI(attr%)
  337.     object file: getansi.obj
  338.  
  339.     GetANSI determines the color attribute used by the ANSI device
  340.     driver.  Attr% returned by this subroutine may be used to restore the
  341.     screen to the default colors at the end of a program.
  342.  
  343.     Example:
  344.          CALL GetANSI(attr%)
  345.          CALL ClrScreen(attr%)
  346.          END
  347.  
  348.  
  349.  
  350.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  351.  
  352.     Subroutine: GetCHR(char%, attr%)
  353.     object file: getchr.obj
  354.  
  355.          GetCHR returns the ASCII code char% and color attribute attr% on
  356.     the screen at the current cursor position.
  357.  
  358.     Example:
  359.          CALL GetCHR(char%, attr%)
  360.          PRINT "The character at the current cursor position is " + CHR$(char%)
  361.  
  362.  
  363.  
  364.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  365.  
  366.     Subroutine: GetPOS(row%, col%)
  367.     object file: getpos.obj
  368.  
  369.          Uses BIOS calls to determine the current cursor position.  Similar
  370.     to QB's col% = POS(x) and row% = CSRLIN commands, but works with non-
  371.     standard text screens.
  372.  
  373.     Example:
  374.          CALL GetPOS(row%, col%)
  375.  
  376.  
  377.  
  378.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  379.  
  380.     Function: HRam9025
  381.     object files: hram9025.obj (hmode.obj, q$herc.obj)
  382.  
  383.          Sets Hercules Graphics Card Plus and Hercules InColor cards
  384.     in a 90-column RAMFont mode, using the standard ROM characters, and
  385.     returns a confirmation/error code.  Although testing is incomplete,
  386.     most QLIB video subroutines (either DVM or BIOS) should work with this
  387.     mode on page 0.  Use GetCRT or FindMono to determine if the HGC+ or
  388.     InColor card is in your system, or declare HRam9025 as a function
  389.     (example 2) and use the return code to determine success.  Up to 14
  390.     screen pages are possible with this mode, using QLIB's DVM subroutines.
  391.     See ShowTPage.  When using LineEdit in this mode on pages other than
  392.     page 0, do not use the BIOS output option.  When restoring the monochrome
  393.     monitor to standard text mode, you must use HText (see GRAPHICS.DOC) or
  394.     your screen will become quite confused, and monitor damage is a
  395.     possiblity (though mine survived the testing).
  396.  
  397.     Example 1:
  398.          CALL HRam9025
  399.  
  400.     Example 2:
  401.          DECLARE FUNCTION HRam9025 ()
  402.             .
  403.             .
  404.             .
  405.          a% = HRam9025: IF a% = 0 THEN PRINT "90-column mode not available"
  406.          REM a% = 144 or greater if successful
  407.  
  408.  
  409.  
  410.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  411.  
  412.     Function: HRam9043
  413.     object files: hram9043.obj (hmode.obj, q$herc.obj, hload8x8.obj, f8x8.obj)
  414.  
  415.     Function: HRam8043
  416.     object files: hram8043.obj (hmode.obj, q$herc.obj, hload8x8.obj, f8x8.obj)
  417.  
  418.          Similar to HRam9025 above, but sets RamFont cards to 80- or
  419.     90-column, 43-row mode.  HRam8043 and HRam9043 overwrite stored fonts
  420.     with a standard 8x8 character font.
  421.  
  422.  
  423.  
  424.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  425.  
  426.     Subroutine: HScroll(row0%, col0%, row1%, col1%, attr%, columns%)
  427.     object files: hscroll.obj
  428.                   (q$window.obj (q$crt.obj), q$qprn.obj, q$clrw.obj)
  429.  
  430.          A DVM horizontal window scroll routine, scrolling left or right.  The
  431.     area scrolled is limited by row0%, col0%, row1%, col1%.  Positive values
  432.     of columns% will scroll the window left, negative values scroll the window
  433.     right, and columns% = 0 will blank the window.  Columns cleared by the
  434.     scrolling action will be set to color attribute attr%.  See also VScroll.
  435.  
  436.     Example:
  437.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: columns% = 1
  438.          CALL HScroll(row0%, col0%, row1%, col1%, attr%, columns%)
  439.          REM we just scrolled a block of the screen one column left
  440.  
  441.  
  442.  
  443.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  444.  
  445.     Function: pointer% = MakeVScreen(rows%, cols%)
  446.     Subroutine: KillVScreen
  447.     object files: vscreen.obj (q$crt.obj, q$alloc.obj)
  448.  
  449.          MakeVScreen allows QLIB's DVM input and output subroutines to be
  450.     directed to a virtual screen in memory other than video memory.
  451.     MakeVScreen must be called to allocate DOS memory and to establish
  452.     VScreen dimensions before the VScreen can be used.  DVM subroutines
  453.     known to work with virtual screens include:
  454.  
  455.     Qprint         Qread          ClrScreen          WindowFrame
  456.     QprintU        HScroll        ReColorWindow      WindowClear
  457.     QprintL        VScroll        PaintWindow        PaintScreen
  458.     QprintCE       WindowSave     ReColorScreen      QprintW
  459.     SaveScreen     WindowRestore  ScreenSize         TLoad
  460.     TSave
  461.  
  462.     VScreens may be used on MDA-equipped computers to duplicate the effects
  463.     possible with multi-page video systems.  Call UseTPage with page% = -1
  464.     to direct QLIB's DVM subroutines to the virtual screen.  If insufficient
  465.     memory is available for the VScreen, MakeVScreen returns pointer% = 0.
  466.     MakeVScreen also releases any previous VScreen memory before making the
  467.     new VScreen.
  468.     KillVScreen releases the VScreen memory, making it available to the
  469.     BASIC program.  After calling KillVScreen, UseTPage with page% = -1
  470.     will make QLIB use a standard monochrome monitor if one is installed.
  471.  
  472.     Example:
  473.  
  474.     REM The computer has only an MDA display, and we want to build a screen
  475.     REM while another is displayed, then pop the virtual screen into view.
  476.  
  477.     REM $INCLUDE: 'qlib.bi'
  478.     CALL ScreenRows(rows%, cols%)       ' get screen dimensions
  479.     pointer = MakeVScreen(rows%, cols%) ' establish memory screen
  480.     CALL UseTPage(-1, oops)
  481.                         ' QLIB's DVM subroutines will print to the virtual
  482.                         ' screen now.  The screen may be viewed by copying
  483.                         ' to page 0.
  484.     REM  Now we want to pop the virtual screen to the display.
  485.     REM  Since only one VScreen page is possible, you must call UseTPage
  486.     REM  again with page% = 0 otherwise TCopy will not work properly.
  487.     CALL UseTPage(0, oops)
  488.     CALL TCopy(-1, 0, oops)
  489.          .
  490.          .
  491.          .
  492.     REM  All done with this virtual screen, so release the memory so
  493.     REM  that the BASIC program can use it.
  494.     CALL KillVScreen
  495.  
  496.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  497.  
  498.      Function: ModeMono
  499.      Function: ModeColor
  500.      object files: mode.obj (find6845.obj)
  501.  
  502.           ModeMono and ModeColor allow you to switch from monochrome to
  503.      color or color to monochrome monitors if you have a 2-monitor system.
  504.      See EQUIP.DOC to determine what monitors are installed.  After using
  505.      ModeMono or ModeColor, the screen will be cleared.  QLIB's video
  506.      subroutines will work with either monitor.  Be sure to return to the
  507.      original monitor before exiting the program, or QB will get quite
  508.      confused.  ModeColor and ModeMono may be used either as functions
  509.      or as subroutines.  See examples.
  510.  
  511.      Example 1:
  512.          CALL ModeMono   ' if no monochrome monitor is installed, no action
  513.                          ' is taken
  514.  
  515.      Example 2:
  516.          DECLARE FUNCTION ModeMono()
  517.             .
  518.             .
  519.             .
  520.          a% = ModeMono: IF a% THEN CALL Qprint("monochrome monitor",1,1,15)
  521.          REM  a% = 0 if no monochrome monitor installed
  522.          REM  with ModeColor, a% = 0 if no color monitor
  523.          REM  if a% = 3, ModeColor was sucessful
  524.          REM  if a% = 7, ModeMono was sucessful
  525.  
  526.  
  527.  
  528.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  529.  
  530.      Function: Mode43
  531.      object file: mode43.obj
  532.  
  533.           Mode43 sets an EGA system in the standard 80-column, 43-row text
  534.      mode (80 column, 50-row mode for VGA).  Mode43 may be called as a
  535.      subroutine or can be used as a function returning an error flag (see
  536.      examples).  Mode43 may also be used to switch to the EGA monitor in
  537.      2-monitor systems.
  538.  
  539.      Example 1:
  540.          CALL GetCRT(crt%)
  541.          IF crt% = 1 OR crt% = 3 THEN CALL Mode43
  542.  
  543.      Example 2:
  544.          DECLARE FUNCTION Mode43% ()
  545.          a% = Mode43: IF a% = 0 THEN PRINT "Mode43 not available"
  546.          REM  a% = 7 if monochrome EGA/VGA, and a% = 3 if color EGA/VGA
  547.  
  548.  
  549.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  550.  
  551.      Function: Mode13243
  552.      Function: Mode13225
  553.      object files: mode132.obj (issevga.obj, egainfo.obj)
  554.  
  555.           Mode13243 and Mode13225 change video modes on supported systems
  556.      to 132-column, 43-row (or 25-row) modes.  Mode13243 and Mode13225
  557.      return 0 if no supported video system is installed.
  558.  
  559.      Supported systems are:
  560.  
  561.      Everex Micro Enhancer EGA
  562.      Paradise EGA 480
  563.      Oak VGA (with Super VGA monitor)
  564.      Paradise Plus 16 VGA (with Super VGA monitor)
  565.      Tseng VGA (with Super VGA monitor)
  566.      Western Digital VGA (with Super VGA monitor)
  567.  
  568.      Contact me to include your equipment in this list.
  569.  
  570.  
  571.      QLIB subroutines which have been tested in these modes are:
  572.  
  573.          Qprint         ClearBlock     WindowRestore    WindowFrame
  574.          QprintCE       LineEdit       PaintWindow      WindowClear
  575.          QprintU        HScroll        ReColorWindow    Scroll
  576.          QprintL        VScroll        ScreenSave       ScreenRestore
  577.          CursorON       QprintW        WindowSave       ClrScreen
  578.          CursorOFF      Qread          ReColorWindow    PaintScreen
  579.          PaintWindow    ReColorScreen  TCopy            SetBlink
  580.          ScreenSize     BlockFrame     Bprint           BprintU
  581.          BprintL        TLoad          TSave            GetPOS
  582.          SetPOS         MovePOS        GetCHR           ScreenRows
  583.          ShowTPage      UseTPage       TPage            BigPrint
  584.          APrint (1)     APrintN (1)    APrintT (1)
  585.  
  586.     (1) A replacement for DOS's ANSI.SYS, such as PC Magazine's ANSI.COM
  587.         may provide superior results with these modes.  I can modify
  588.         ANSI.COM to work with your 132-column mode.
  589.  
  590.     BASIC's screen input/output commands, like PRINT and LOCATE, will
  591.     not position the cursor properly in 132 column modes.  Use QLIB's
  592.     subroutines instead.
  593.  
  594.     Use ModeColor or Mode43 to return the system to a standard mode.
  595.     If you do not return to a standard mode before ENDing your program,
  596.     it is likely you will end up with an unreadable screen.
  597.  
  598.     Example:
  599.         REM $INCLUDE: 'qlib.bi'
  600.         IF Mode13243 THEN ...       ' function success
  601.  
  602.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  603.  
  604.     Subroutine: MovePOS(rows%, cols%)
  605.     object file: movepos.obj
  606.  
  607.          Moves the cursor from its present position by rows% rows and cols%
  608.     columns.  Rows% and cols% may be positive or negative.
  609.  
  610.     Example:
  611.          rows% = -2              ' move the cursor up two rows
  612.          cols% = 0
  613.          CALL MovePOS(rows%, cols%)
  614.  
  615.  
  616.  
  617.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  618.  
  619.     Subroutine: PaintScreen(attr%)
  620.     object files: paint.obj (q$crt.obj, q$paint.obj)
  621.  
  622.          PaintScreen changes the color attribute over the entire screen to
  623.     attr%.  Affects only the video page set by UseTPage.
  624.  
  625.     Example:
  626.          CALL PaintScreen(attr%)
  627.  
  628.  
  629.  
  630.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  631.  
  632.     Subroutine: PaintWindow(row0%, col0%, row1%, col1%, attr%)
  633.     object files: pwindow.obj (q$window.obj, q$crt.obj, q$paint.obj)
  634.  
  635.          DVM routine which changes the color attribute on a block of the
  636.     active video page defined by row0%, col0%, row1%, col1%.  The entire block
  637.     is changed to attr%.  Changes color on video page set by UseTPage.
  638.  
  639.     Example:
  640.          row0% = 1: col0% = 1: row1% = 25: col1% = 80
  641.          CALL PaintWindow(row0%, col0%, row1%, col1%, attr%)
  642.          REM  we just changed the entire screen to color attr% without
  643.          REM  re-printing the text.
  644.  
  645.  
  646.  
  647.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  648.  
  649. THE QPRINT SERIES
  650.  
  651.     QuickPRINT DVM routines print a string of text on the screen at very
  652.     high speed.  QPRINT routines include built-in LOCATE and COLOR statements,
  653.     and do not affect the cursor position.  ALL ASCII characters may be used,
  654.     but QPRINT routines work only in text mode.  Color attributes (attr%) may
  655.     be calculated with ColorATTR.  UseTPage sets QPRINT's active page (Page 0
  656.     only for MDA).
  657.  
  658.     Subroutine: QCenter(st$, row%, attr%)
  659.     object files: qcenter.obj (q$crt.obj, q$qprn.obj)
  660.  
  661.     Subroutine: QPrint(st$, row%, col%, attr%)
  662.     object files: qprint.obj (q$crt.obj, q$qprn.obj)
  663.  
  664.     Subroutine: QPrintU(st$, row%, col%, attr%)
  665.     Subroutine: QPrintL(st$, row%, col%, attr%)
  666.     object files: qprintul.obj (q$crt.obj)
  667.  
  668.     Subroutine: QPrintCE(st$, row%, col%, attr%)
  669.     object files: qprintce.obj (q$crt.obj, q$qprn.obj, q$clrw.obj)
  670.  
  671.          QPrint, the fastest and most compact of the QPRINT series, will
  672.     meet most needs.  QPrintU will print a-z as upper case A-Z, and QPrintL
  673.     will print A-Z as lower case a-z without changing st$.  QPrintCE clears
  674.     the screen from the end of st$ to the right edge of the screen.  QCenter
  675.     qprints the string centered horizontally on the row specified.
  676.  
  677.     Example:
  678.          st$ = "This is a test of fast screen printing"
  679.          row% = 10: col% = 20
  680.          CALL QPrint(st$, row%, col%, attr%)
  681.  
  682.  
  683.  
  684.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  685.  
  686.     Subroutine: QprintVArray(addr%, row0%, col%, attr%, n%)
  687.     object files: qprintva.obj (q$crt.obj, q$qprn.obj)
  688.  
  689.     Subroutine: QprintFArray(segment%, addr%, len(a), row0%, col0%, attr%, n%)
  690.     object files: qprintfa.obj (q$crt.obj, q$qprn.obj)
  691.  
  692.          QprintArray subroutines print n% elements of the string array a$()
  693.     beginning at row0%.  The first array element is printed at row0%, col%,
  694.     the second at row0% + 1, col%, and so on.  QprintVArray is for arrays of
  695.     normal variable-length strings, and QprintFArray is for arrays of QB4's
  696.     fixed-length strings.
  697.  
  698.     Example 1:
  699.          DIM a$(10)          ' 11 array elements, a$(0) through a$(10)
  700.          a$(0) = "This is the first string"
  701.          a$(1) = "This is the second string"
  702.          n% = 5                   ' print a$(0) through a$(4)
  703.          row0% = 5: col% = 10
  704.          addr% = VARPTR(a$(0))    ' a$(0) is the first one to be printed
  705.          CALL QprintVArray(addr%, row0%, col%, attr%, n%)
  706.  
  707.     Example 2:          (QB4+ only)
  708.          DIM a(10) AS STRING*20   ' 11 array elements, each string 20 bytes
  709.          a(0) = "This is the first string"
  710.          a(1) = "This is the second string"
  711.          n% = 5: row0% = 5: col% = 10: l% = LEN(a(0))
  712.          segment% = VARSEG(a(0))
  713.          addr% = VARPTR(a(0))
  714.          CALL QprintFArray(segment%, addr%, l%, row0%, col%, attr%, n%)
  715.  
  716.  
  717.  
  718.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  719.  
  720.     Subroutine: QPrintW(st$, row0%, col0%, row1%, col1%, attr%)
  721.     object files: qprintw.obj
  722.                   (q$window.obj, q$crt.obj, q$qprn.obj, q$clrw.obj)
  723.  
  724.          QPrintW adds word wrap to QPrint.  Text is confined to a window of
  725.     the screen defined by row0%, col0%, row1%, col1%, and each line of text
  726.     is broken between words unless the word is longer than the width of the
  727.     window, when the word will be broken at the edge of the window. QPrintW
  728.     also clears all parts of the window not occupied by the string. If st$
  729.     is a nul string, QPrintW will clear the window and return to QuickBASIC.
  730.  
  731.     Example:
  732.          st$ = "This is a test of fast screen printing with word wrap"
  733.          row0% = 10: col0% = 20: row1% = 15: col1% = 50
  734.          CALL QPrintW(st$, row0%, col0%, row1%, col1%, attr%)
  735.  
  736.  
  737.  
  738.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  739.  
  740.     Subroutine: QRead(st$, row%, col%)
  741.     object files: qread.obj (q$crt.obj)
  742.  
  743.          Uses DVM to read a string of text from the active video page.
  744.     The initial length of st$ determines the length of the string returned
  745.     by QRead.  This is like QPrint in reverse.
  746.  
  747.     Example:
  748.          st$ = SPACE$(14)
  749.          row% = 12: col% = 5
  750.          CALL QRead(st$, row%, col%)
  751.          REM  st$ is now the first 14 characters on the active video page
  752.          REM  beginning at row 12, column 5
  753.  
  754.  
  755.  
  756.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  757.  
  758.     Subroutine: ReColorScreen(oldattr%, newattr%)
  759.     object files: recolor.obj (q$crt.obj)
  760.  
  761.          Replaces oldattr% with newattr%, allowing the programmer to
  762.     selectively change screen colors.  Affects only the video page set by
  763.     UseTPage.
  764.  
  765.     Example:
  766.          ReColorScreen(oldattr%, newattr%)
  767.  
  768.  
  769.  
  770.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  771.  
  772.     Subroutine: ReColorWindow(row0%, col0%, row1%, col1%, oldattr%, newattr%)
  773.     object files: rcwindow.obj (q$window.obj, q$crt.obj, recolor.obj)
  774.  
  775.          Replaces oldattr% color with newattr% in the window defined by
  776.     row0%, col0%, row1%, col1%, without re-printing the contents of the
  777.     window.
  778.  
  779.     Example:
  780.          oldattr% = 7             ' gray on black to be replaced
  781.          newattr% = 14            ' with bright red on black
  782.          row0% = 10: col0% = 1    ' from row 10, column 1
  783.          row1% = 25: col1% = 80   ' to the end of the screen
  784.          CALL ReColorWindow(row0%, col0%, row1%, col1%, oldattr%, newattr%)
  785.  
  786.  
  787.  
  788.     ScreenRows(rows%, columns%)
  789.     object files: scrnrows.obj (q$crt.obj)
  790.  
  791.         ScreenRows allows you to determine the screen's dimensions.  Rows
  792.     are the vertical dimension and columns are the horizontal dimension.
  793.  
  794.     Example:
  795.         CALL ScreenRows(rows%, columns%)
  796.         REM a standard 80 x 25 screen returns rows% = 25 and columns% = 80
  797.  
  798.  
  799.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  800.  
  801.     Subroutine: ScreenRestore(screenaddr%)
  802.     Subroutine: ScreenSave(screenaddr%)
  803.     object files: screen.obj (q$crt.obj, q$clrw.obj)
  804.  
  805.     Function: ScreenMem
  806.     object files: smem.obj (q$crt.obj, q$alloc.obj)
  807.  
  808.     Uses DVM to save/restore display screen video page set by UseTPage in a
  809.     memory buffer.  ScreenMem calculates the amount of memory required to
  810.     store the screen, allocates the memory, and returns the segment address
  811.     of the memory block.  Use FreeMem(screenaddr%) to release the memory.
  812.  
  813.     Example:
  814.          REM $INCLUDE: 'qlib.bi'
  815.          screenaddr% = ScreenMem
  816.          CALL ScreenSave(screenaddr%)      ' save this screen
  817.             .
  818.             .
  819.             .
  820.          CALL ScreenRestore(screenaddr%)   ' bring the screen back
  821.          CALL FreeMem(screenaddr%)         ' release the memory block
  822.  
  823.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  824.  
  825.     Subroutine: Scroll(row0%, col0%, row1%, col1%, attr%, lines%)
  826.     object file: scroll.obj
  827.  
  828.          Uses BIOS calls to scroll a window of the screen lines% rows,
  829.     limited by row0%, col0%, row1%, col1%.  Positive values of lines% will
  830.     scroll the screen up, negative values scroll the screen down, and lines%
  831.     = 0 will blank the window.  Rows cleared by the scrolling action will be
  832.     set to color attribute attr%.
  833.  
  834.     Example:
  835.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: lines% = 1
  836.          CALL Scroll(row0%, col0%, row1%, col1%, attr%, lines%)
  837.          REM we just scrolled everything in the window up one row
  838.  
  839.  
  840.  
  841.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  842.  
  843.     Subroutine: SetBLINK(a%)
  844.     object file: setblink.obj
  845.  
  846.          Enables / disables blinking attributes in text mode.  When blinking
  847.     is disabled, blinking reverse video attributes are changed from normal
  848.     intensity backgrounds to high intensity.  SetBLINK affects all screen
  849.     pages.
  850.  
  851.     Example:
  852.          a% = 0
  853.          CALL SetBLINK(a%)  ' turn blink off, high intensity backgrounds on
  854.          a% = 1
  855.          CALL SetBLINK(a%)  ' restore blinking attributes
  856.  
  857.  
  858.  
  859.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  860.  
  861.     Subroutine: SetPOS(row%, col%)
  862.     object file: movepos.obj
  863.  
  864.          Positions the cursor at row%, col%.  Similar to QB's LOCATE row, col
  865.     command, but works with non-standard text screens.  Don't use SetPOS to
  866.     position the cursor for a PRINT command.
  867.  
  868.     Example:
  869.          CALL Mode13243       ' use 132-column mode
  870.          row% = 40
  871.          col% = 100
  872.          CALL SetPOS(row%, col%)
  873.  
  874.  
  875.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  876.  
  877.      Subroutine: ShowTPage(page%, oops%)
  878.      object files: tpage.obj (q$crt.obj, q$herc.obj)
  879.  
  880.          ShowTPage allows you to see screen page number page%.  Does
  881.      NOT affect QuickBASIC's PRINT command.  NOTE: ShowTPage will not
  882.      work with MDA or standard Hercules equipment.  On HGC+, ShowTPage
  883.      works with either HText (pages 0 - 3) or HRam9025 (pages 0 - 2) modes.
  884.      Use QLIB's DVM subroutines to print on all Hercules (standard or HGC+)
  885.      pages, and use CursorON to position the cursor.  See also UseTPage and
  886.      TPage.  Oops% = -1 if page% is too big, and oops% = 1 if QLIB can
  887.      use the page but can't display it (as with a standard Hercules page).
  888.      If ShowTPage can't show a page, you can use TCopy to copy the page to
  889.      one that can be shown.
  890.  
  891.      Example:
  892.          CALL ShowTPage(page%, oops%)
  893.  
  894.  
  895.  
  896.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  897.  
  898.     Subroutine: SnowON
  899.     Subroutine: SnowOFF
  900.     object file: crt.asm
  901.  
  902.          Alters "snow" control used by QLIB's DVM subroutines.  QLIB's
  903.     default is SnowON with CGA and MCGA, SnowOFF with other video systems.
  904.     SnowON prevents annoying interference on the screen with older CGA video
  905.     systems.  This "snow" control slows QLIB when used with CGA.  Many newer
  906.     CGA cards do not have the "snow" problem.  SnowOFF disables QLIB's snow
  907.     control logic for maximum speed.  Use SnowOFF if the computer is a
  908.     PS/2 model 25 or model 30 with MCGA.
  909.  
  910.  
  911.     Example:
  912.         REM $INCLUDE: 'qlib.bi'
  913.         PRINT "Do you want to disable the snow control?"
  914.         IF YesNo = ASCII("Y") THEN CALL SnowOFF
  915.  
  916.  
  917.  
  918.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  919.  
  920.     Subroutine: TCopy(frompage%, topage%, oops%)
  921.     object files: tcopy.obj (tpage.obj, q$crt.obj, q$herc.obj, q$clrw.obj)
  922.  
  923.          Similar to BASIC's PCOPY command, TCopy copies one page of video
  924.     memory to another using DVM.  This may be used to save screens to recall
  925.     later.  Oops% will be set to -1 if frompage% is too big, or -2 if
  926.     topage% is too big.  Oops% = 0 if no error.  For MDA systems use
  927.     ScreenSave.
  928.  
  929.     All screen pages saved by TCopy are erased when the system is
  930.     changed to or from Graphics mode.  (Except when using QLIB's HGraph0
  931.     on Hercules systems.  See GRAPHICS.DOC.)  Use ScreenSave to save text
  932.     screens before the system is used in Graphics mode.  TCopy works in all
  933.     multi-page text modes supported by QLIB.
  934.  
  935.     Example:
  936.          CALL TCopy(frompage%, topage%, oops%)
  937.  
  938.  
  939.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  940.  
  941.     Subroutine: TLoad(filename$, oops%)
  942.     object files: tsave.obj (q$crt.obj)
  943.  
  944.          TLoad copies a screen file from a disk to video memory.  The file
  945.     name passed to TLoad must be an ASCIIZ (zero-terminated) string.  Oops%
  946.     returned by TLoad = 0 if no error occurred.  See also TSave.
  947.  
  948.     Example:
  949.         filename$ = "helpfile.hlp" + CHR$(0)
  950.         CALL TLoad(filename$, oops%)
  951.  
  952.  
  953.  
  954.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  955.  
  956.     Subroutine: TPage(page%, oops%)
  957.     object files: tpage.obj (q$crt.obj, q$herc.obj)
  958.  
  959.          TPage combines the functions of UseTPage and ShowTPage.
  960.  
  961.     Example:
  962.          CALL TPage(page%, oops%)
  963.          REM this is equivalent to
  964.          REM  CALL UseTPage(page%, oops%)
  965.          REM  CALL ShowTPage(page%, oops%)
  966.  
  967.  
  968.  
  969.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  970.  
  971.     Subroutine: TSave(filename$, oops%)
  972.     object files: tsave.obj (q$crt.obj)
  973.  
  974.          TSave copies a text-mode screen to a file.  The file name passed
  975.     to TSave must be an ASCIIZ (zero-terminated) string.  Oops%
  976.     returned by TSave = 0 if no error occurred.  See also TLoad.
  977.  
  978.     Example:
  979.         filename$ = "helpfile.hlp" + CHR$(0)
  980.         CALL TSave(filename$, oops%)
  981.  
  982.  
  983.  
  984.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  985.  
  986.     Subroutine: VScroll(row0%, col0%, row1%, col1%, attr%, lines%)
  987.     object files: vscroll.obj
  988.                   (q$window.obj, q$crt.obj, q$wcpy.obj, q$clrw.obj)
  989.  
  990.          A DVM vertical window scroll routine.  The area scrolled is limited
  991.     by row0%, col0%, row1%, col1%.  Positive values of lines% will scroll the
  992.     screen up, negative values scroll the screen down, and lines% = 0 will
  993.     blank the block of the screen.  Rows cleared by the scrolling action will
  994.     be set to color attribute attr%.  See also HScroll.
  995.  
  996.     Example:
  997.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: lines% = 1
  998.          CALL VScroll(row0%, col0%, row1%, col1%, attr%, lines%)
  999.          REM we just scrolled a block of the screen one row up
  1000.  
  1001.  
  1002.  
  1003.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1004.  
  1005.     Subroutine: UseTPage(page%, oops%)
  1006.     object files: tpage.obj (q$crt.obj, q$herc.obj)
  1007.  
  1008.          Sets active video page used by most DVM video routines.  See also
  1009.     TPage and ShowTPage.  Oops% = -1 if page% is too big.  Does NOT affect
  1010.     BIOS subroutines.  If page% = -1, QLIB's DVM subroutines will use
  1011.     either a standard 80-column, 25-row monochrome monitor if installed,
  1012.     or a 'virtual' screen established by MakeVScreen.
  1013.  
  1014.     Example:
  1015.          page% = 2
  1016.          CALL UseTPage(page%, oops%)
  1017.          REM  Qread, SaveScreen, PaintWindow, ClrScreen,
  1018.          REM  ClrBlock, VScroll, ReColorWindow, WindowSave, WindowResore,
  1019.          REM  HScroll and the Qprint series will now use screen page 2.
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1025.  
  1026.      Subroutine: WindowClear(row0%, col0%, row1%, col1%, attr%)
  1027.      object files: wclear.obj (q$window.obj, q$crt.obj, q$clrw.obj)
  1028.  
  1029.          Uses DVM to clear a window of the screen from row0%, col0%, to
  1030.      row1%, col1%, where row1% > row0%, col1% > col0%.  The window may be
  1031.      cleared to any color attribute. Color attributes may be calculated
  1032.      using ColorATTR.
  1033.    
  1034.      Example:
  1035.          CALL WindowClear(row0%, col0%, row1%, col1%, attr%)
  1036.  
  1037.  
  1038.  
  1039.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1040.  
  1041.      Subroutine: WindowFill(row0%, col0%, row1%, col1%, attr%, char%)
  1042.      object files: wfill.obj
  1043.                    (wclear.obj, q$window.obj, q$crt.obj, q$clrw.obj)
  1044.  
  1045.           Fills an area of the screen with specified character and color
  1046.      attribute; this is an alternate entry for the WindowClear subroutine.
  1047.  
  1048.      Example:
  1049.          char%  = ASC("■")
  1050.          CALL WindowFill(row0%, col0%, row1%, col1%, attr%, char%)
  1051.  
  1052.      
  1053.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1054.  
  1055.      Subroutine: WindowFrame(style%, row0%, col0%, row1%, col1%, attr%)
  1056.      object files: wframe.obj
  1057.                    (q$window.obj, q$crt.obj, q$qprn.obj, q$clrw.obj)
  1058.  
  1059.           WindowFrame draws a box with corners at (row0%, col0%),
  1060.      (row0%, col1%), (row1%, col0%), (row1%, col1%).  Double lines are used to
  1061.      draw the box if style% = -1, single lines if style% = 0.  An ASCII
  1062.      character may be used instead of single or double lines, if style% is
  1063.      an integer from 1 to 255.  The border will be made of CHR$(style%).
  1064.  
  1065.      Example:
  1066.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: style% = -1
  1067.          CALL WindowFrame(style%, row0%, col0%, row1%, col1%, attr%)
  1068.          REM we just drew a box on the screen in color attr%, using
  1069.          REM double lines
  1070.            .
  1071.            .
  1072.            .
  1073.          style$ = "Yellow"
  1074.          style% = ASC(style$)
  1075.          CALL WindowFrame(style%, row0%, col0%, row1%, col1%, attr%)
  1076.          REM we just replaced the double-lined box with a box bordered
  1077.          REM with "Y"
  1078.  
  1079.  
  1080.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1081.  
  1082.     Subroutine: WindowSave(windowaddr%, row0%, col0%, row1%, col1%)
  1083.     Subroutine: WindowRestore(windowaddr%, row0%, col0%, row1%, col1%)
  1084.     object files: wsave.obj (q$window.obj, q$crt.obj, q$wcpy.obj)
  1085.  
  1086.     Function: wsegment% = WindowMem(row0%, col0%, row1%, col1%)
  1087.     object files: wsave.obj (q$alloc.obj, q$window.obj, q$crt.obj)
  1088.  
  1089.     Must compile BASIC source code with /O option
  1090.  
  1091.     WindowSave is used to copy a block of the screen to an array in order
  1092.     to restore the window at a later time with WindowRestore.  WindowMem
  1093.     calculates the size of the memory block needed to store the window and
  1094.     allocates the memory, returning the segment address of the memory block.
  1095.  
  1096.     Example:
  1097.     REM $INCLUDE: 'qlib.bi'
  1098.     row0% = 10: col0% = 10: row1% = 20: col1% = 60
  1099.     wsegment% = WindowMem(row0%, col0%, row1%, col1%)
  1100.     IF wsegment% = 0 THEN ...   ' do error handling stuff - could be too big
  1101.     CALL WindowSave(wsegment%, row0%, col0%, row1%, col1%)
  1102.          .
  1103.          .
  1104.     CALL WindowRestore(wsegment%, row0%, col0%, row1%, col1%)
  1105.     CALL FreeMem(wsegment%)     ' release the memory block
  1106.